package test1;

	import java.util.Arrays;

	public class ArrayIntegerStack implements IntegerStack  {
	    private Object[] arr;
	    private Integer top;
		private int size;



		 ArrayIntegerStack(int capacity){  
	        this.top = capacity;  
	        this.arr = new Object[this.top];  
	        this.size = 0;  
	    }  
	    
	    
		@Override
		public Integer push(Integer item) {
			if(item==null)
				return null;
			if(top==arr.length)
		        return null;
			arr[top++]=item;
		        return item;
		}

		@Override
		public Integer pop() {
			// TODO Auto-generated method stub
			return null;
		}

		@Override
		public Integer peek() {
			// TODO Auto-generated method stub
			return null;
		}

		@Override
		public boolean empty() {
			// TODO Auto-generated method stub
			return false;
		}

		@Override
		public int size() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public String toString() {
			return "ArrayIntegerStack [arr=" + Arrays.toString(arr) + ", top=" + top + "]";
		}


		}


